import axios from 'axios';
import type { DescData } from '@arco-design/web-vue/es/descriptions/interface';

export function queryDeviceList() {
    return axios.post('/api/v1/device/list');
}
/**
 * 获取设备详情
 */
export function getDeviceInfo(data: any) {
    return axios.post('/api/v1/device/detail', data);
}
/**
 * 设备规格列表
 */
export function getDeviceSpecList(data: any) {
    return axios.post('/api/v1/deviceSpecs/list', data);
}

/**
 * 设备告警
 */
export function getDeviceAlertList(data: any) {
    return axios.post('/api/v1/device/alertLog/list', data);
}

export function getDevicePropertyHisList(data: any) {
    return axios.post('/api/v1/device/property/history', data);
}

export interface Device {
    deviceId: number;
    deviceNo: string;
    deviceName?: string;
    properties?: any;
    lastUpdateTime?: string;
    productCategory?: number;
    status?: number;
    data?: DescData[];
}
